<template>
	<view class="ninfo">
		<view class="ninfo-title">{{item.title}}</view>
		<view class="ninfo-time">{{item.create_time}}</view>
		<view class="ninfo-cont">
			<jyf-parser :html="item.content" ref="article"></jyf-parser>
		</view>
	</view>
</template>

<script>
	import jyfParser from "@/components/jyf-parser/jyf-parser";
	export default {
		data() {
			return {
				item: {},
			}
		},
		onLoad() {
			if(uni.getStorageSync('newsContent')) {
				this.item = JSON.parse(uni.getStorageSync('newsContent'));
				console.log(this.item)
				this.item.content = this.item.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;width:100%;width:auto" '); //图片自适应问题
			};
		},
		components: {
			jyfParser
		},
		methods: {
			
		}
		
	}
</script>

<style scoped>
	.ninfo{
		width: 100%;
		min-height: 100%;
		background-color: #FFFFFF;
		padding: 17px;
		
	}
.ninfo-title{
	color: #333333;
	font-size: 21px;
	font-weight: bold;
}
.ninfo-time{
	color: #999999;
	font-size: 13px;
	padding-bottom: 10px;
}
.ninfo-cont{
	color: #666666;
	font-size: 15px;
}
</style>
